<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html>
<html>
<head>
  <title>员工信息表</title>
  <style type="text/css">
    table {
      border-collapse: collapse;
      width: 75%;
      border: 1px solid;
    }
    td {
      border: 1px solid
    }
  </style>
</head>
<body>
<div align="center">
  <s:include value="add.jsp" />
  <s:a href="department">部门表</s:a>
  <table>
    <tr>
      <th>员工id</th>
      <th>员工姓名</th>
      <th>性别</th>
      <th>电话</th>
      <th>部门id</th>
      <th>操作</th>
    </tr>
    <s:if test="employees!=null&&employees.size>0">
      <s:iterator value="employees" var="employee">
        <tr>
          <td><s:property value="#employee.employeeId" /></td>
          <td><s:property value="#employee.employeeName" /></td>
          <td>
            <s:if test="#employee.sex==1">
              <s:property value="'男'" />
            </s:if>
            <s:else>
              <s:property value="'女'" />
            </s:else>
          </td>
          <td><s:property value="#employee.telephone" /></td>
          <td><s:property value="#employee.departmentId" /></td>
          <td>
            <s:a href="employee!edit?employee.employeeId=%{#employee.employeeId}">编辑</s:a>
            <s:a href="employee!remove?employee.employeeId=%{#employee.employeeId}">移除</s:a>
          </td>
        </tr>
      </s:iterator>
    </s:if>
  </table>
</div>
</body>
</html>
